﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ArmoryData
{
    public sealed class ArmoryPage
    {
        private string Page {get; set;}

        /// <summary>
        /// Initializes a new instance of the <see cref="ArmoryPage"/> class.
        /// </summary>
        /// <param name="p">The p.</param>
        private ArmoryPage(string page)
        {
            Page = page;
        }

        /// <summary>
        /// Performs an implicit conversion from <see cref="System.String"/> to <see cref="ArmoryData.ArmoryPage"/>.
        /// </summary>
        /// <param name="s">The string.</param>
        /// <returns>The result of the conversion.</returns>
        public static implicit operator ArmoryPage(string value)
        {
            return FromString(value);
        }

        /// <summary>
        /// Performs an implicit conversion from <see cref="System.String"/> to <see cref="ArmoryData.ArmoryPage"/>.
        /// </summary>
        /// <param name="s">The string.</param>
        /// <returns>The result of the conversion.</returns>
        public static ArmoryPage FromString(string value)
        {
            return new ArmoryPage(value);
        }

        /// <summary>
        /// Returns a <see cref="System.String"/> that represents this instance.
        /// </summary>
        /// <returns>
        /// A <see cref="System.String"/> that represents this instance.
        /// </returns>
        public override string ToString()
        {
            return this.Page;
        }

        /// <summary>
        /// Gets the url of the character page.
        /// </summary>
        public static ArmoryPage Character { get { return "character-sheet.xml"; } }
        /// <summary>
        /// Gets the url of the talent page.
        /// </summary>
        public static ArmoryPage Talent { get { return "character-talents.xml"; } }
        /// <summary>
        /// Gets the url of the character's arena team page.
        /// </summary>
        public static ArmoryPage ArenaTeams { get { return "character-arenateams.xml"; } }
        /// <summary>
        /// Gets the url of the reputation page.
        /// </summary>
        public static ArmoryPage Reputation { get { return "character-reputation.xml"; } }
    }
}
